public boolean doPost(String var1, boolean var2) {
if (this.postactive) {
return false;
} else {
++this.postcount;
if (this.postcount > 25 && !CU.firstToken(var1).equals("logoff")) {
this.chesslogic.alert("This is a demo-version of Fly_Chess and limited to " + CU.int2str(25) + " posts to the NotTheFly servlet. \n" + "Please 'Logoff' before exit.\nContact NotTheFly for more information." + "End of Fly_Chess demo");
} else if (CU.containsExpr(var1, "declines the match offer")) {
this.matchissued = false;
this.chesslogic.alert(var1);
} else if (CU.containsExpr(var1, "You accept the challenge")) {
this.isplaying = true;
this.ischallenged = false;
} else if (CU.containsExpr(var1, "You decline the match offer")) {
this.isplaying = false;
this.ischallenged = false;
} else if (!CU.containsExpr(var1, "You are not playing a game") && !CU.containsExpr(var1, "You are neither playing, observing nor examining a game")) {
if (!CU.containsExpr(var1, "Illegal move") && !CU.containsExpr(var1, "Not a legal move") && !CU.containsExpr(var1, "Your king is in check") && !CU.containsExpr(var1, "It isnΓÇÖt your turn") && !CU.containsExpr(var1, "It is not your move")) {
if (CU.containsExpr(var1, "offers you a draw")) {
this.drawoffered = true;
this.chesslogic.alert(var1);
} else if (CU.containsExpr(var1, "would like to abort")) {
this.chesslogic.alert(var1);
} else if (CU.containsExpr(var1, "{Game")) {
this.chesslogic.reset();
this.chesslogic.alert(var1);
this.isplaying = false;
this.drawoffered = false;
this.matchissued = false;
} else if (CU.containsExpr(var1, "telnet-failure")) {
this.chesslogic.alert("telnet-failure, in case of multiple failures, please logoff and try logon again");
} else if (CU.containsExpr(var1, "Maximum number of refreshes exceeded")) {
this.chesslogic.alert("Could not obtain new board situation, please choose 'nextstate' in MENU to try again");
} else if (this.postactive) {
if (this.prevshow) {
this.chesslogic.alert(var1);
}
} else if (this.show) {
this.chesslogic.alert(var1);
}
} else {
this.chesslogic.alert(var1);
}
} else {
this.isplaying = false;
this.chesslogic.alert(var1);
}
}
public boolean postActive() {
return this.postactive;
}
public synchronized void receiveServletResponse(String var1) {